home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-21 / qwhite.zip / CHOOSDIR.TEC < prev    next >
Text File  |  1992-03-09  |  3KB  |  69 lines

  1. ID:CD Choosing a Directory When Starting a DESQview Window
  2. Quarterdeck Technical Note #217
  3. By:  Joe Wilder
  4. last revision:  6 February 1992
  5.  
  6.       HOW A PROGRAM CAN CHOOSE A DIRECTORY ON STARTUP IN DESQVIEW
  7.  
  8.      A question mark may be used in the parameter field of Change a Program to 
  9. cause a program to pause and take input while starting. This function can be 
  10. incorporated into a system whereby a batch file is used to start the program 
  11. and a variable in the batch file lets you choose a default directory while the 
  12. batch file is running.  The DESQview manual has a reference to the use of a 
  13. question mark in the parameter field.  It can be found by looking under 
  14. "parameters" in the index at the back the book.  Here is an example of how 
  15. Change a Program should look:
  16.  
  17.                               Change a Program
  18.  
  19. Program Name............: WordPerfect 5
  20.  
  21. Keys to Use on Open Menu: WP          Memory Size (in K): 400
  22. -----------------------------------------------------------------
  23. Program...: WORDPERF.BAT
  24.  
  25. Parameters: ?
  26.  
  27. Directory.: \
  28. -----------------------------------------------------------------
  29. Options:
  30.  
  31.      Writes text directly to screen.......: [N]                   
  32.      Displays graphics information........: [Y]                   
  33.      Virtualize text/graphics (Y,N,T).....: [N]                   
  34.      Uses serial ports (Y,N,1,2)..........: [N]                   
  35.      Requires floppy diskette.............: [N]
  36.  
  37.  
  38.      Here is an example of how the batch file should look:
  39.  
  40. (WORDPERF.BAT)
  41.  
  42. CD %1
  43. C:\WP50\WP
  44.  
  45.      We've purposely made the batch file with a different name than the 
  46. program startup file.  The reason for this is that, in most versions of DOS, 
  47. if there is a WP.BAT and a WP.EXE file in the same directory, the WP.EXE file 
  48. will be executed even if you specifically type in WP.BAT to start it.  I put 
  49. the WORDPERF.BAT file in the root directory.  However, I could have put it in 
  50. the \WP50 directory, because the filename is different from that of the 
  51. WordPerfect executable file.
  52.  
  53.      When you start WordPerfect from the DESQview Open Window menu, the batch 
  54. file starts to run, but immediately pauses because of the question mark in the 
  55. parameter field in Change a Program.  The "%1" variable on the "CD %1" line in 
  56. the batch file is part of DOS's batch language; it provides a way for the user 
  57. to specify a parameter on the command line and have it be passed to a 
  58. particular place inside the batch file.  The directory you type in at the 
  59. pause will be placed in the batch file in place of the "%1."  When you hit the 
  60. Enter key, the batch file will continue and start WordPerfect from the 
  61. directory you have specified. 
  62.  
  63.  
  64.   ************************************************************************
  65.   *This technical note may be copied and distributed freely as long as it*
  66.   *is distributed in its entirety and it is not distributed for profit.  *
  67.   *         Copyright (C) 1991-2 by Quarterdeck Office Systems           *
  68.   ************************ E N D   O F   F I L E *************************
  69.